<script type="text/javascript">
	var foo = '123';
	function print(){
		var foo = '456';
		this.foo = '789';
		console.log(foo);//456
	}
	print();


</script>

<script type="text/javascript">
	var foo = '123';
	function print(){
		//var this = Object .creat(print.prototype)
		this.foo = '234';
		console.log(foo);//访问的foo不是this上的foo
	}
	new print();
</script>

<script type="text/javascript">
	var a = 5;
	function test(){
		a = 0;
		alert(a);
		alert(this.a);
		var a;
		alert(a);
	}
	//AO{
	//	a: 0
	//	this : {}
	//}
	new test();
</script>

<script type="text/javascript">
	function print(){
		console.log(foo);//undefined
		var foo = 2;
		console.log(foo);//2
		console.log(hello);//报错，hello is not defined
	}
	print();
</script>

<script type="text/javascript">
	function print(){
		var test;
		test();
		function test(){
			console.log(1);
		}
	}
	print();
</script>

<script type="text/javascript">
	function print(){
		var x = 1;
		if(x == '1')
			console.log('one!');
		
		if(x === '1')console.log('two')
	}
	print();
</script>

<script type="text/javascript">
	var bar = {a : '002'};
	function print() {
		bar.a = 'a';
		Object.prototype.b = 'b';
		return function inner() {
			console.log(bar.a);//a
			console.log(bar.b);//b
		}
	}
	print()();
</script>